#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <string.h>
#include <QSerialPort>
#include <QDebug>
#include <QSerialPortInfo>
#include <QList>
#include <QTime>
#include <QTimer>
#include <QCoreApplication>
#include <QNetworkInterface>
#include <QObject>
#include <QMessageBox>
#include <QTcpSocket>


QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();
    void Socket_Init(void);
    void connected_slot();
    void disconnected_slot();
    void readyRead_slot();
    void ComTextDisplay(QString qStr, const Qt::GlobalColor &color = Qt::black);
    void SerialPort_RecDisplay(QByteArray data, const Qt::GlobalColor &color = Qt::black);
    void TCPProcess_Frame(QString str);
private slots:
    void on_CONNECT_clicked();
    void on_pushButton_clicked();

private:
    Ui::MainWindow *ui;
    QTcpSocket *socket;
};
#endif // MAINWINDOW_H
